package com.ruoyi.sj.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.sj.mapper.DynamicPermitMapper;
import com.ruoyi.sj.domain.DynamicPermit;
import com.ruoyi.sj.service.IDynamicPermitService;
import com.ruoyi.common.support.Convert;

/**
 * 动态权限 服务层实现
 * 
 * @author tyc@yanyu.com
 * @date 2018-12-29
 */
@Service
public class DynamicPermitServiceImpl implements IDynamicPermitService 
{
	@Autowired
	private DynamicPermitMapper dynamicPermitMapper;

	/**
     * 查询动态权限信息
     * 
     * @param id 动态权限ID
     * @return 动态权限信息
     */
    @Override
	public DynamicPermit selectDynamicPermitById(Long id)
	{
	    return dynamicPermitMapper.selectDynamicPermitById(id);
	}
	
	/**
     * 查询动态权限列表
     * 
     * @param dynamicPermit 动态权限信息
     * @return 动态权限集合
     */
	@Override
	public List<DynamicPermit> selectDynamicPermitList(DynamicPermit dynamicPermit)
	{
	    return dynamicPermitMapper.selectDynamicPermitList(dynamicPermit);
	}
	
    /**
     * 新增动态权限
     * 
     * @param dynamicPermit 动态权限信息
     * @return 结果
     */
	@Override
	public int insertDynamicPermit(DynamicPermit dynamicPermit)
	{
	    return dynamicPermitMapper.insertDynamicPermit(dynamicPermit);
	}
	
	/**
     * 修改动态权限
     * 
     * @param dynamicPermit 动态权限信息
     * @return 结果
     */
	@Override
	public int updateDynamicPermit(DynamicPermit dynamicPermit)
	{
	    return dynamicPermitMapper.updateDynamicPermit(dynamicPermit);
	}

	/**
     * 删除动态权限对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
	@Override
	public int deleteDynamicPermitByIds(String ids)
	{
		return dynamicPermitMapper.deleteDynamicPermitByIds(Convert.toStrArray(ids));
	}
	
}
